package com.powernode.config;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
 * 消息队列rabbitmq的消息转换发送器的配置类
 */
@Configuration
public class RabbitMQConfig {

    /**
     * 消息转换器,使用json进行持久化转换消息
     */
    @Bean
    public MessageConverter jsonMessageConverter() {
        return new Jackson2JsonMessageConverter();
    }
}
